# -*- coding: utf-8 -*-

""" This files stores all the basic type value classes.
"""

from .ir_type import *


class IValue:
    def __init__(self, type: IType, value=None):
        self.type = type
        self.value = value

    def __str__(self):
        return str(self.value)


class IValueInt(IValue):
    def __init__(self, value: int):
        super(IValueInt, self).__init__(ITypeInt, value)


class IValueFloat(IValue):
    def __init__(self, value: float):
        super(IValueFloat, self).__init__(ITypeFloat, value)


class IValueComplex(IValue):
    def __init__(self, value: complex):
        super(IValueComplex, self).__init__(ITypeComplex, value)


class IValueBool(IValue):
    def __init__(self, value: bool):
        super(IValueBool, self).__init__(ITypeBool, value)


class IValueStr(IValue):
    def __init__(self, value: str):
        super(IValueStr, self).__init__(ITypeStr, value)
